package com.example.design.apply;

import com.example.design.apply.bean.ApproveParam;
import com.example.design.apply.impl.DestroyedApprove;
import com.example.design.apply.impl.LogisticsApprove;

/**
 * @author 杜款
 * 审批抽象类
 */
public abstract class Approve {

    /**
     * 审批方法
     * @param approveParam 审批入参
     */
    public abstract void doApprove(ApproveParam approveParam);

    public enum ApproveType{

        /** 毁单申请 */
        DESTROYED_APPROVE(DestroyedApprove.class),
        /** 物流申请 */
        LOGISTICS_APPROVE(LogisticsApprove.class);

        public final Class<? extends Approve> approve;

        ApproveType(Class<? extends Approve> applyClass) {
            this.approve = applyClass;
        }
    }
}
